<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
<title>WangID通城</title>
<link rel="stylesheet" href="css/index.css" type="text/css">
<link rel="stylesheet" href="css/zy.css" type="text/css">
<link rel="stylesheet" href="css/swiper.min.css" type="text/css">
<script type="text/javascript" src="js/swiper.min.js"></script>
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
	<script src="/js/common.js"></script>
</head>
<body> 
<!--页面内容
<div id="yemnr">--> 
<!--头部--> 
<div class="toub_beij toub_beij_zy">
	<div class="zhongj_k zhongj_k_z">
		<div class="jiu_feo">
			<div class="logo_k logo_k_fanh"><a href="/shopping/pointshop.html"><img class="fanh_ann" src="images/web/fanh.png"></a></div>
			<div class="zhongjain_daoh">
				<!--<ul>
					<li class="xiangq"><a href="商品页面.html">商品</a></li>
					<li><a href="XiangQ_Y_2.html">详情</a></li>
					<li><a href="评论.html">评价</a></li>
				</ul>-->
			</div>
		</div>
		<div class="dengl">
			<!--<div class="caid_img" id="zhu_caid">
				&lt;!&ndash;<img src="images/web/cd_1.png"></div>&ndash;&gt;
			<ul class="zhu_daoh" id="daoh_lb">
				<em></em>
				<li><a href="index.html">首页</a></li>
				<li><a href="分类.html">商品分类</a></li>
				<li><a href="#">扫一扫</a></li>
				<li><a href="购物车.html">购物车</a></li>
				<li class="wu"><a href="#">我的通城</a></li>
			</ul>
		</div>-->
	</div>
</div>
<script type="text/javascript">
	//滑动头部透明（针对首页头部用）
	window.onscroll=function(){

	var autoheight=document.body.scrollTop||document.documentElement.scrollTop;
	if(autoheight>10){
		$(".toub_beij").css("position" ,"fixed")
		}else{
			$(".toub_beij").css("position" ,"relative")
		}
	}


</script>
<!--内容-->  
<!--banner-->
<div class="swiper_container_suz1">
    <div class="swiper-wrapper">
		<div class="swiper-slide"> <img  id="coverUrl"> </div>
    </div>
    <!-- Add Pagination -->
    <!--<div class="swiper-pagination"></div>-->
    <!-- Add Arrows --> 
</div> 

<!-- Initialize Swiper -->
<script>
var swiper = new Swiper('.swiper_container_suz1', {
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    pagination: '.swiper-pagination',
    paginationType: 'fraction',
    autoplay : 2000
});
</script>
<!--商品名称-->
<div class="xiangq_shangp_m">
	<p class="px24"></p>
	<p class="px18"></p>
	<div class="xq_jiaq"><p><em></em>积分</p><span></span></div>
</div>
<!--商品参数选择-->
<!--<div class="cans_xuanz" id="dianjisj">
	<p>已选：<em class="px22">5000/I5-7200/4G/1T/2G</em class="px22"><em>1个</em><i></i></p> 
</div>-->
<!--弹出选择-->
<!--<aside class="wup_xuanz" id="xianq_tanc">
	<div class="bg" id="ds"></div>
	<div class="wup_kuan" id="tanchu_d">
		<div class="youk_1">
			<div class="shang_sp">
				<h1><img src="images/web/shangp_xiangq_img.jpg"></h1>
				<p class="px24"><em class="px26">￥5600.00</em><br>有货</p>
				<span class="close_standard" id="chacha"></span>
			</div>
			<div class="banb" id="banb">
				<ul>
					<h1>版本</h1>
					<li class="no">潮5000/I5-7200/4G/1T/2G</li>
					<li>潮5000/I7-7500/4G/1T</li>
					<li>I7-7500/4G/500G/2G</li>
				</ul>
			</div>
			<div class="goum_sl">
				<p class="px22">数量<em>限购20件</em></p>
				<div class="counter_box">
					<i class="jian">-</i>
					<input type="text" value="1">
					<i class="jia">+</i>
				</div>
			</div>
			<div class="goum">
				<a href="#">加入购物车</a>
				<a class="houm" href="#">立即购买</a>
			</div>
		</div>
	</div>
</aside>-->
<!--店铺-->  
<!--<div class="xiangq_dp_k">
	<div class="dianpulogo">
		<h1><img src="images/web/dainpu_logo.jpg"></h1>
		<div class="dianp_pf">
			<p class="px24">鼎力顺达电脑专营店</p>
			<div class="xx">
				<p></p>
				<p></p>
				<p></p>
				<p></p>
				<p></p>
				<span><em>4.00</em>分</span>
			</div>
		</div>
	</div>
	<div class="pf_a">
		<p>商品描述<em>4.15</em></p>
		<p class="z">发货速度<em>4.15</em></p>
		<p class="you">服务质量<em>4.15</em></p>
	</div>
	<div class="jindain_anniu">
		<a href="ShangJia_DianPu.html" class="a1"><h1><img src="images/web/dainp01.png"></h1>进店逛逛</a>
		<a href="#" class="a2"><h1><img src="images/web/dianpu_shouc.png"></h1>收藏店铺</a>
	</div>
</div>-->
<!--店铺 简介-->  
<!--<div class="dp_jj">
	<p>地址：贵州省贵阳市云岩区大亨大厦16层</p>
	<p>联系人：潘中全</p>
	<p>电话：0852-8667011</p>
	<p>营业时间：09:00至18:00</p>
	<h1>公司简介：</h1>
	<p>魅CO视觉，主张时尚个性的摄影理念，以独特和新锐的时尚触觉为客户提供性化的摄影服务。追逐时尚，同时更注重情感表达。用最丰....</p>
</div>-->
<!--评价--> 
<!--<div class="pj_k">
	<div class="bt"><p>评价<em>（100+）</em></p><span>好评度  <em>95%</em></span></div>
	<div class="toux_k"><h1><img src="images/web/6565.jpg"></h1>
		<span>Aa***hg</span>
		<div class="sd"><p></p><p></p><p></p><p></p></div>
	</div>
	<p class="px22">收到后用了几天才来评价，联想的机子确实不错，秒开机，没噪音，外观也漂亮，完美的一次购物。五分</p>
</div>
<div class="lianjie">
	<a href="评论.html">查看更多评价</a>
</div>-->

<!--差你喜欢-->
<!--<div class="cainixhk">
	<h1>猜你喜欢</h1>
	<ul>
		<li><a href="#"><h1><img src="images/web/001.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
		<li><a href="#"><h1><img src="images/web/002.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
		<li><a href="#"><h1><img src="images/web/003.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
		<li><a href="#"><h1><img src="images/web/001.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
		<li><a href="#"><h1><img src="images/web/002.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
		<li><a href="#"><h1><img src="images/web/003.jpg"></h1><p class="px26">￥5250.00 </p><p>御泥坊  清洁净清洁净肤片装片装...</p></a></li>
	</ul>
</div>-->
<!--底部导航-->
<!---->
<div class="dib_daoh_b">
	<div class="gouwuc_">
		<!--<div class="zuo">
			<div class="mis"><a href="#"><h1><img src="images/web/ms01.png"></h1><p>密使</p></a></div>
			<div class="mis"><a href="#" id="dianji_img"><h1><img src="images/web/ms03.png" id="img_tih"></h1><p>收藏</p></a></div>
			<div class="mis"><a href="/shopping/cart.html"><h1><img src="images/web/ms02.png"></h1><p>购物车</p></a></div>
		</div>-->
		<div class="you">
			<div class="goum">
				<a  class="cartBtn" >加入购物车</a>
				<a class="houm buyBtn">立即兑换</a>
			</div>
		</div>
	</div>
</div>


<!--大框div
</div>-->
<!--搜索页面-->
 

</div>
</body>
</html>

<script type="text/javascript">



	$(function () {

	    var userId = getUser().id; //userId
        var id = getParams().id; //goodsId

        $(".cartBtn").attr("href","/shopping/cart.html?id="+id);

        $.get("/goods/"+id , function (data) {
            console.log(data);
            $(".swiper_container_suz1 img").attr("src",data.coverUrl);
            $($(".xiangq_shangp_m p")[0]).html(data.title);
            $($(".xiangq_shangp_m p")[1]).html(data.description);
            $(".xiangq_shangp_m .xq_jiaq em").html(data.price);
        });


        $(".cartBtn").click(function () {
            var btn = $(this);
            $.post("/carts",{userId: userId,goodsId: id},function (data) {
				btn.attr("href","/shopping/cart.html");
            });
        });

        $(".buyBtn").click(function () {
            location.href = "/shopping/productAdd.html?goodsId="+id;
        });

    });

	window.onload=function(){ 
		var TheMenu=document.getElementById('zhu_caid');
		var LieBiao=document.getElementById('daoh_lb'); 
		var Html=document.getElementsByTagName("html")[0];//0 第一个数组
		/*TheMenu.onclick=function(event)
		{
			if (LieBiao.style.display=='block')
			{
				LieBiao.style.display='none';
			}
			else {
				LieBiao.style.display='block';
			}  
			event.stopPropagation();//阻止冒泡事件
		} 
		Html.onclick=function(){
			LieBiao.style.display='none';
		}*/

		/*var DianJ=document.getElementById('dianjisj');
		var XiangQTC=document.getElementById('xianq_tanc');
		var TanC=document.getElementById('tanchu_d');
		var YiChuL=document.getElementById('ds');
		var Ca=document.getElementById('chacha');
		DianJ.onclick=function()
		{
			TanC.className+=' slide_in';
			XiangQTC.style.display='block';
			YiChuL.style.opacity='0.4';
		}
		YiChuL.onclick=function()
		{
			TanC.classList.remove("slide_in");
			XiangQTC.style.display='none';
		}
		Ca.onclick=function()
		{
			TanC.classList.remove("slide_in");
			XiangQTC.style.display='none';
		}

		var BanB=document.getElementById('banb');
		var BabBLi=BanB.getElementsByTagName('li');
		for( var i=0;i<BabBLi.length;i++)//循环每个li的
		{
			BabBLi[i].onclick=function()
			{
				for( var i=0;i<BabBLi.length;i++)//循环去掉li的样式
				{
					BabBLi[i].className=''; 
				}
				
				this.className='no';//自身添加className='no'
			}
		}
		var DianJ=document.getElementById('dianji_img');
		var ImgTiHuan=document.getElementById('img_tih');
			DianJ.onclick=function()
			{
				ImgTiHuan.src='images/web/ms03-1.png'; 
				alert("收藏成功");
			}*/

	};

 
 
</script>